//////////////////////////////////////////////////////////////////////////
///	\file:	WindowTimer.h
///	Copyright (MingYou) 2009 - All Rights Reserved
///	Author:	Robert.Ma
///	Date:	[2009/04/25]
///	Description:
///		A timer class in a window.
//////////////////////////////////////////////////////////////////////////
#pragma once

class CWindowTimer
{
public:
	DWORD __fastcall GetInterval(void) const;
	CWindowTimer(DWORD dwInterval, BOOL bAutoSet = FALSE);
	virtual ~CWindowTimer(void);

	virtual UINT Start();
	virtual BOOL Stop();

protected:
	virtual void __fastcall PerformEvent(void) PURE;

private:
	static void __stdcall TimerProc(HWND hWindow,
	                                UINT uMessage,
	                                UINT uID, DWORD dwTime);


protected:
	HWND	m_hWindow;
	DWORD	m_dwInterval;
	BOOL	m_bSet;
};
